let div =document.querySelector(".photo")
console.log(div);
let objpid = new URLSearchParams(location.search);
let pid=objpid.get("pid")

let url="http://jx.xuzhixiang.top/ap/api/detail.php"


axios.get(url,{params:{
    id:pid,
}}).then((res)=>{
    console.log(res.data.data);
    let obj=res.data.data
   
    div.setAttribute('style',`background-image: url(${obj.pimg})`)
	
   
    div.innerHTML=`
    <div class="photo_left">
        <div class="infor_top" id="name">${obj.pname}</div>
        <div class="infor_cen">
          <span>律所主任</span
          ><span><img src="./images/jingxuan.png" alt="" /></span>
        </div>
        <div class="infor_bot">
          <span>${obj.pdesc}</span><span>${obj.pdesc}</span><span>${obj.pdesc}</span>
        </div>
      </div>
      <div class="photo_right">
        <div class="year">
          <div class="con1">23</div>
          <div class="con2">执业年限</div>
        </div>
        <div class="number">
          <div class="con1">${obj.pid}</div>
          <div class="con2">帮助人数</div>
        </div>
      </div>
    `
  let divser =document.querySelector(".service")
  divser.innerHTML=`
  <div class="ser_title">在线咨询-1天</div>
  <div class="explain">
    1天服务期内提问100%解答，不限咨询次数，可查看聊天记录；擅长家庭婚姻，劳动纠纷，刑事辩护
  </div>
  <div>
    <span class="span0">￥</span><span class="span1">${obj.pprice}</span
    ><span class="span2">律所价格：</span><span class="span3">￥${obj.pprice*3}</span>
  `
})
